<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>
    <script>
        var ul = document.querySelector('ul');
        //1.node.cloneNode() 括号里为空或者是false为浅拷贝，只复制标签不复制内容 
        //2.node.cloneNode() 括号里为true 深拷贝 既复制标签也复制内容
       
        var li1 = ul.children[0].cloneNode(); //浅拷贝
        ul.insertBefore(li1, ul.children[0]);

        var li2 = ul.children[3].cloneNode(true); //深拷贝
        ul.appendChild(li2);

    </script> 
</body>
</html>